package com.DeliveryProgram.www.po;

import java.util.ArrayList;
import java.util.List;

public class User {
    private int uid;
    private String name;
    private int money;

    /**用户拥有的折扣券*/
    private List<Coupons>coupons=new ArrayList<Coupons>();

    /**用户的评论*/
    private List<Comment>comments=new ArrayList<Comment>();

    /**用户储存的地址*/
    List<Address>addresses=new ArrayList<Address>();

    /**用户的订单*/
    List<Order>orders=new ArrayList<Order>();



    public List<Address> getAddresses() {
        return addresses;
    }

    public void setAddresses(List<Address> addresses) {
        this.addresses = addresses;
    }

    public List<Order> getOrders() {
        return orders;
    }

    public void setOrders(List<Order> orders) {
        this.orders = orders;
    }


    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getMoney() {
        return money;
    }

    public void setMoney(int money) {
        this.money = money;
    }

    public List<Coupons> getCoupons() {
        return coupons;
    }

    public void setCoupons(List<Coupons> coupons) {
        this.coupons = coupons;
    }

    public List<Comment> getComments() {
        return comments;
    }

    public void setComments(List<Comment> comments) {
        this.comments = comments;
    }

    public void setCoupons(Coupons coupons){
        this.coupons.add(coupons);
    }

    public void setComments(Comment comments){
        this.comments.add(comments);
    }

    public void setOrders(Order orders){
        this.orders.add(orders);
    }

    public void setAddresses(Address addresses){
        this.addresses.add(addresses);
    }

    public  void addMoney(int money){
        this.money+=money;
    }

    public void payMoney(int num){this.money-=num;}
}
